﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:WGM_Client_Net35"
	xmlns:settings="clr-namespace:WGM_Client_Net35.Properties"
    xmlns:WGM_Client_Net35_Properties="clr-namespace:WGM_Client_Net35.Properties"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
    x:Class="WGM_Client_Net35.LoginWindow"

    Title="Login to WGM Beta" Height="154" Width="394" ResizeMode="NoResize" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Name="window">
	<Window.Resources>

		<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
			<Style.BasedOn>
				<Style TargetType="{x:Type ButtonBase}">
					<Setter Property="FocusVisualStyle">
						<Setter.Value>
							<Style>
								<Setter Property="Control.Template">
									<Setter.Value>
										<ControlTemplate>
											<Border>
												<Rectangle SnapsToDevicePixels="True" Margin="4,4,4,4" Stroke="#FF000000" StrokeDashArray="1 2" StrokeThickness="1"/>
											</Border>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
						</Setter.Value>
					</Setter>
					<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
					<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>

					<Setter Property="BorderThickness" Value="1,1,1,1"/>
					<Setter Property="HorizontalContentAlignment" Value="Center"/>
					<Setter Property="VerticalContentAlignment" Value="Center"/>
					<Setter Property="Padding" Value="0,0,1,1"/>
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="{x:Type ButtonBase}">
								<Microsoft_Windows_Themes:ClassicBorderDecorator SnapsToDevicePixels="True" x:Name="ContentContainer" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderStyle="Raised" BorderThickness="3,3,3,3">
									<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True"/>
								</Microsoft_Windows_Themes:ClassicBorderDecorator>
								<ControlTemplate.Triggers>
									<Trigger Property="IsKeyboardFocused" Value="True">
										<Setter Property="BorderBrush" TargetName="ContentContainer">
											<Setter.Value>
												<SolidColorBrush Color="LightYellow"/>
											</Setter.Value>
										</Setter>
									</Trigger>
									<Trigger Property="Button.IsDefaulted" Value="True">
										<Setter Property="BorderBrush" TargetName="ContentContainer" Value="Red"/>
									</Trigger>
									<Trigger Property="IsPressed" Value="True">
										<Setter Property="Background" TargetName="ContentContainer">
											<Setter.Value>
												<SolidColorBrush Color="#FFFF3B00"/>
											</Setter.Value>
										</Setter>
									</Trigger>

									<Trigger Property="IsEnabled" Value="False">
										<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
									</Trigger>
								</ControlTemplate.Triggers>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Style.BasedOn>
		</Style>
        <Storyboard x:Key="OnLoaded1" Storyboard.TargetName="middleStop" Storyboard.TargetProperty="Color">
            <ColorAnimation  To="#FF5A8EA2" From="#FFFFFFFF"  Duration="00:00:30" AutoReverse="True" RepeatBehavior="Forever"/>
        </Storyboard>
	</Window.Resources>
	<Window.Triggers>

	</Window.Triggers>
	<Window.Top>
		<Binding Path="MainWindowTop" Mode="TwoWay" Source="{x:Static settings:Settings.Default}"/>
	</Window.Top>
	<Window.Left>
		<Binding Path="MainWindowLeft" Mode="TwoWay" Source="{x:Static settings:Settings.Default}"/>
	</Window.Left>
    <Window.Background>
        <LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
            <GradientStop Color="#FF000000" Offset="1"/>
            <GradientStop Color="#FF000000" Offset="0"  />
            <GradientStop Color="{Binding Path=WindowColorScheme, Mode=OneWay, Source={x:Static settings:Settings.Default}}" Offset="0.5" x:Name="middleStop"/>
        </LinearGradientBrush>
    </Window.Background>
    <StackPanel>
        <StackPanel.Effect>
            <DropShadowEffect ShadowDepth="10"/>
        </StackPanel.Effect>
        <Grid x:Name="_allControls" Height="111">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="89*" />
                <ColumnDefinition Width="204*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="35" />
                <RowDefinition Height="35" />
                <RowDefinition Height="44" />
                <RowDefinition Height="3*" />
            </Grid.RowDefinitions>
            
            <TextBox Margin="0,5,5,5" x:Name="_usernameTb" BorderThickness="0" Grid.Column="1" FontFamily="Verdana" FontSize="14" />
            <TextBlock Text="Username:" Foreground="White" Margin="9,9,6,5" x:Name="textBlock1" FontFamily="Verdana" FontSize="14" />
            <PasswordBox Grid.Row="1" Margin="0,5,5,5" x:Name="_passwordTB" BorderThickness="0" Grid.Column="1" FontFamily="Verdana" FontSize="14" />
            <TextBlock Grid.Row="1" Text="Password:" Foreground="White" Margin="9,9,6,5" x:Name="textBlock2" FontFamily="Verdana" FontSize="14" />
            <Button Grid.Column="1" Grid.Row="2" Margin="92,3,0,9" x:Name="_loginBtn" BorderBrush="#00C4B0B0" BorderThickness="1"  Style="{DynamicResource ButtonStyle1}" Content="Login" Foreground="#FFFFFFFF" Click="_loginBtn_Click" HorizontalAlignment="Left" Width="80">
        	    <Button.Background>
        		    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			    <GradientStop Color="#FF5C7889" Offset="0"/>
        			    <GradientStop Color="#FF585858" Offset="1"/>
        		    </LinearGradientBrush>
        	    </Button.Background>
            </Button>
            <Button Grid.Column="1" BorderBrush="#00C4B0B0" Grid.Row="2" HorizontalAlignment="Right" Margin="0,3,5,9" x:Name="_cancelBtn" Width="80" Content="Cancel" Style="{DynamicResource ButtonStyle1}" Foreground="#FFFFFFFF" Click="_cancelBtn_Click">
		        <Button.Background>
    		        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    			        <GradientStop Color="#FF5C7889" Offset="0"/>
    			        <GradientStop Color="#FF585858" Offset="1"/>
    		        </LinearGradientBrush>
    	        </Button.Background>
	        </Button>
            <CheckBox Grid.Row="2" Margin="8,4,0,15" Name="_rememberChk" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="116">            
                <CheckBox.IsChecked>
                    <Binding Path="RememberLogin" Mode="TwoWay" Source="{x:Static settings:Settings.Default}"/>
                </CheckBox.IsChecked>
                <Label Foreground="White" Content="Remember Login"  />
            </CheckBox>
            <TextBlock Text="Create Account" Grid.Row="2" Name="textBlock3" Foreground="White" Margin="8,0,18.996,-5" Cursor="Hand" MouseDown="textBlock3_MouseDown" Height="21" VerticalAlignment="Bottom" Grid.RowSpan="2" />
        </Grid>
    </StackPanel>
</Window>
